<html>
<head>
   <title>Testing Wiki</title>
<head>
<body>
<?php>

   require_once ('/var/www/peachy/Init.php');

   function addKeyValue ( &$editarray ) 
   {
      $editarray['section'] = 2;
   }
   
   $wiki = Peachy::newWiki ("ini");
   $page = $wiki -> initPage ("TestPage"); 
  
   $text = "=Section 1=\n";

   $text .= "123 Testing new testing on this.";

   $commentText = $page -> get_text (false, 2);
   pecho ("Comment Text: $commentText \n", PECHO_NORMAL );
   
   if ( $commentText == '' )
   {
      $text .= "\n=Comments=\n";
   }
   else 
   {
      $text .= "\n" . $commentText;    
   }
   
   //$pgHooks['StartEdit'][] = 'addKeyValue';

   $page -> edit ( $text, "Create test page" ); 

   //pecho ("Comment text: " . $commentText , PECHO_NOTICE);
?>
</body>
</html>

